package aaa;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import java.awt.Toolkit;

public class J26_SungJukMainFrame extends JFrame {
	private JPanel contentPane;
	private static J26_SungJukMainFrame frame;
	// JDialog 에서 부모 객체를 지정하기 쉽도록
	// frame을 전역 변수로 선언
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					 frame = new J26_SungJukMainFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	
	public J26_SungJukMainFrame() {
		setIconImage(Toolkit.getDefaultToolkit().getImage(J26_SungJukMainFrame.class.getResource("/aaa/icon4.png")));
		setTitle("성적처리 프로젝트v 0.1");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 800, 600);
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu mnFile = new JMenu("파일(F)");
		menuBar.add(mnFile);
		
		JMenuItem miExit = new JMenuItem("새성적(N)");
		miExit.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new J26_SungJukNewData(frame);
			}
		});
		miExit.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\새 폴더\\new_4.png"));
		mnFile.add(miExit);
		
		JSeparator separator = new JSeparator();
		mnFile.add(separator);
		
		JMenuItem menu = new JMenuItem("종료");
		menu.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);				
			}
		});	
			
		menu.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\새 폴더\\exit.png"));
		mnFile.add(menu);
		
		JMenu mnView = new JMenu("보기(V)");
		menuBar.add(mnView);
		
		JMenuItem miList = new JMenuItem("전체 성적보기(L)");
		miList.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new J26_SungJukShowList(frame);
				
			}
		});
		miList.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\새 폴더\\icon6.png"));
		mnView.add(miList);
		
		JMenu mnHelp = new JMenu("도움말(H)");
		menuBar.add(mnHelp);
		
		JMenuItem miHelp = new JMenuItem("도움말 항목(H)");
		miHelp.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\새 폴더\\Faq1.png"));
		mnHelp.add(miHelp);
		
		JSeparator separator_1 = new JSeparator();
		mnHelp.add(separator_1);
		
		JMenuItem miAbout = new JMenuItem("프로그램 정보(A)");
		miAbout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new J26_SungJukAboutDialog(frame);
			}
		});
		miAbout.setIcon(new ImageIcon("C:\\Users\\501-pc13\\Desktop\\새 폴더\\pp.png"));
		mnHelp.add(miAbout);
		getContentPane().setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		getContentPane().add(panel);
		
		JLabel limage = new JLabel("");
		limage.setToolTipText("냐옹~");
		limage.setHorizontalAlignment(SwingConstants.CENTER);
		limage.setIcon(new ImageIcon(J26_SungJukMainFrame.class.getResource("/aaa/splash.png")));
		panel.add(limage);
	}

	}